﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Test
{
    [TestClass]
    public class BingServices
    {
        public static void Main(string[] args)
        {
        }

        [TestMethod]
        public void SearchGood()
        {
            var result = OpenSMIL.Server.BingServices.Address.ValidateAddress("storgatan 1, sundsvall");
            Assert.AreEqual(OpenSMIL.Server.BingServices.Accuracy.GOOD, result);
        }

        [TestMethod]
        public void SearchModerate()
        {
            var result = OpenSMIL.Server.BingServices.Address.ValidateAddress("storgatan, sundsvall");
            Assert.AreEqual(OpenSMIL.Server.BingServices.Accuracy.MODERATE, result);
        }

        [TestMethod]
        public void SearchModerateFrost()
        {
            var result = OpenSMIL.Server.BingServices.Address.ValidateAddress("fröstvägen 16, 86592, alnö");
            Assert.AreEqual(OpenSMIL.Server.BingServices.Accuracy.GOOD, result);
        }

        [TestMethod]
        public void SearchBad()
        {
            var result = OpenSMIL.Server.BingServices.Address.ValidateAddress("storgatn, sudnsav");
            Assert.AreEqual(OpenSMIL.Server.BingServices.Accuracy.BAD, result);
        }
    }
}
